package com.yn.iotxiao.sql.entity.User;

import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;

@Data
@Table(name = "StudentInfo",comment = "学生表")
public class StudentInfo {

    @IsKey
    @NotNull(message = "学籍号不能为空")
    private String gh;
    @NotNull(message = "姓名不能为空")
    @Column
    private String name;
    @Column(name = "livingType",comment = "0、不分走读，住校，1、住校，2、走读")
    private int  livingType;

    @Column(name = "CREATETIME",comment = "录入时间")
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    @DefaultValue("CURRENT_TIMESTAMP")
    private Date createTime;
}
